package com.zhixin.fans.ks.ui.module;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import com.zhixin.fans.ks.R;
import com.zhixin.fans.ks.api.res.SubModule;

import java.util.List;

public class ModuleItemAdapter extends BaseQuickAdapter<SubModule, BaseViewHolder> {
    public ModuleItemAdapter(@Nullable List<SubModule> data) {
        super(R.layout.item_module_item_layout, data);

    }

    @Override
    protected void convert(BaseViewHolder helper, SubModule item) {

        Glide.with(mContext).asBitmap().load(item.getGca_icon()).into((ImageView) helper.getView(R.id.img_sub_icon));
        helper.setText(R.id.tv_sub_name, item.getGca_name());
    }
}
